//
//  FactoryMethod.h
//  MyLink
//
//  Created by 吕晶 on 2019/6/18.
//  Copyright © 2019 Test. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface FactoryMethod : NSObject

/**
 计算字符长度
 */
+ (CGSize)sizeWithText:(NSString *)text font:(UIFont *)font maxSize:(CGSize)maxSize;

+ (NSString *)removerNumberWithZero:(NSString *)number;

+ (UIImage *)imageWithColor:(UIColor *)color;

+ (BOOL)isNull:(NSString *)string;

+ (NSString *)toJSONString:(id)data;

+ (NSString *)stringWithJSONData:(id)infoDict;

+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;

//判断是否整数
+ (BOOL)isPureInt:(NSString*)string;
//验证是否邮箱
+ (BOOL)isEmail:(NSString *)str;
//验证手机号
+ (BOOL)isPhone:(NSString *)str;

+ (UIViewController *)getCurrentVC;

/**
 使用imageIO中的api生成data
 */
+ (NSData *)rawData2:(UIImage *)image;

@end

NS_ASSUME_NONNULL_END
